﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" ValidateRequest="false"%>

<%@ Register TagPrefix="FTB" Namespace="FreeTextBoxControls" Assembly="FreeTextBox" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <style type="text/css">
        .table
        {
            display: block;
            background-color: #FFFFFF;
            font-family: 'Helvetica Neue' , Helvetica, Arial, Verdana, sans-serif;
            font-size: 12px;
            height: auto;
            width: 1050px;
            margin-left: 250px;
            margin-right: 250px;
            border: 1px solid #a1a1a1;
        }
    </style>
    <title>VnExpress</title>
</head>
<body background="Image/Background.jpg">
    <form id="form1" runat="server">
    <div>
        <table class="table" style="width: 1100px;">
            <tr>
                <td colspan="2">
                    <asp:Image ID="Image1" runat="server" Height="311px" ImageUrl="~/Image/Banner.jpg"
                        Width="1093px" />
                </td>
            </tr>
            <tr>
                <td>
                    &nbsp;</td>
                <td>
                    &nbsp;
                    Các tin lấy được từ VnExpress.net <script type="text/javascript" src="scripts/HienNgayHomNay.js"></script>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="Label2" runat="server" Text="Menu"></asp:Label>
                </td>
                <td>
                    <asp:DropDownList ID="ddlCategory" runat="server" AutoPostBack="true" OnSelectedIndexChanged="ddlCategory_SelectedIndexChanged"
                        Width="225px">
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="Label3" runat="server" Text="Topic"></asp:Label>
                </td>
                <td>
                    <asp:DropDownList ID="ddlTopic" runat="server" AutoPostBack="true" OnSelectedIndexChanged="ddlTopic_OnSelectedIndexChanged"
                        Width="450px">
                    </asp:DropDownList>
                    &nbsp;
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="Label5" runat="server" Text="Title"></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="txtTitle" runat="server" Width="1022px"></asp:TextBox>
                    &nbsp;
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="Label6" runat="server" Text="Description"></asp:Label>
                </td>
                <td rowspan="2">
                    <asp:TextBox ID="txtDescription" runat="server" Height="65px" TextMode="MultiLine"
                        Width="1022px"></asp:TextBox>
                    &nbsp;
                </td>
            </tr>
            <tr>
                <td>
                    &nbsp;
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="Label7" runat="server" Text="Content"></asp:Label>
                </td>
                <td rowspan="10">
                    <ftb:FreeTextBox ID="FreeTextBoxContent" runat="server" Width="1022px">
                    </ftb:FreeTextBox>
                    &nbsp;
                </td>
            </tr>
            <tr>
                <td>
                    &nbsp;
                </td>
            </tr>
            <tr>
                <td>
                    &nbsp;
                </td>
            </tr>
            <tr>
                <td>
                    &nbsp;
                </td>
            </tr>
            <tr>
                <td>
                    &nbsp;
                </td>
            </tr>
            <tr>
                <td>
                    &nbsp;
                </td>
            </tr>
            <tr>
                <td>
                    &nbsp;
                </td>
            </tr>
            <tr>
                <td>
                    &nbsp;
                </td>
            </tr>
            <tr>
                <td>
                    &nbsp;
                </td>
            </tr>
            <tr>
                <td>
                    &nbsp;
                </td>
            </tr>
            <tr>
                <td>
                    &nbsp;
                </td>
                <td>
                    <asp:Button ID="btnSubmit" runat="server" OnClick="btnSubmit_OnClick" Text="Update Database" />
                    &nbsp;
                </td>
            </tr>
            <tr>
                <td>
                    &nbsp;
                </td>
                <td>
                    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:VNEXPRESSConnectionString %>"
                        DeleteCommand="DELETE FROM TINTUC WHERE (ID = @ID)" InsertCommand="INSERT INTO TINTUC(CHUYENMUC, TIEUDE, MOTA, NOIDUNG, NGAYPOST) VALUES (@CHUYENMUC, @TIEUDE, @MOTA, @NOIDUNG, @NGAYPOST)"
                        SelectCommand="SELECT TINTUC.* FROM TINTUC" UpdateCommand="UPDATE TINTUC SET CHUYENMUC = @CHUYENMUC, TIEUDE = @TIEUDE, MOTA = @MOTA, NOIDUNG = @NOIDUNG, NGAYPOST = @NGAYPOST WHERE (ID = @ID)">
                        <DeleteParameters>
                            <asp:Parameter Name="ID" />
                        </DeleteParameters>
                        <UpdateParameters>
                            <asp:Parameter Name="CHUYENMUC" />
                            <asp:Parameter Name="TIEUDE" />
                            <asp:Parameter Name="MOTA" />
                            <asp:Parameter Name="NOIDUNG" />
                            <asp:Parameter Name="NGAYPOST" />
                            <asp:Parameter Name="ID" />
                        </UpdateParameters>
                        <InsertParameters>
                            <asp:Parameter Name="CHUYENMUC" />
                            <asp:Parameter Name="TIEUDE" />
                            <asp:Parameter Name="MOTA" />
                            <asp:Parameter Name="NOIDUNG" />
                            <asp:Parameter Name="NGAYPOST" />
                        </InsertParameters>
                    </asp:SqlDataSource>
                    &nbsp;
                </td>
            </tr>
        </table>
    </div>
    </form>
</body>
</html>
